;--------------------------------------
;
; prog4-12.asm
;
; Demonstration of 
;   Long To Ascii (ltoa) code conversion
;   Integer To Ascii (itoa) code conversion
;

;--------------------------------------
;
; include all defines, macros, 
; prototypes and set up memory model
;

include tab6.inc


;--------------------------------------
;
; Create stack
;

	.STACK                         ; 1 k by default

;--------------------------------------
;
; Declare data segment
;

	.DATA

num16   dw      63498
number1 dd      65849
number  dd      -12
buffer  db      12 DUP(0)
counter dw      0

;--------------------------------------
;
; Begin code segment
;

	.CODE


;--------------------------------------
;
; Start program here
;

	.STARTUP


; clear the screen

        INVOKE clrScrn,7

        INVOKE  ltoa,ADDR buffer,ADDR number1
        INVOKE  bdwrite,0,0,ADDR buffer

        INVOKE  ltoa,ADDR buffer,ADDR number
        INVOKE  bdwrite,1,0,ADDR buffer

        INVOKE  itoa,ADDR buffer,num16
        INVOKE  bdwrite,2,0,ADDR buffer


; move the cursor to 3,0

        INVOKE  mvCur,3,0



;
	.EXIT

;--------------------------------------
;
; End of ASSEMBLY source file
;

	END


;
;--------------------------------------
